/**
 * 
 */
package com.teamall.web.sjtj.customdb.dao;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.teamall.core.common.Page;
import com.teamall.web.sjtj.customdb.dao.mapper.IProjectSummaryMapper;

/**
 * <Description> <br>
 * 
 * @author pan.xiaobo<br>
 * @version 1.0<br>
 * @taskId <br>
 * @CreateDate 2017年9月12日 <br>
 * @since V1.0<br>
 * @see com.teamall.web.sjtj.customdb.dao <br>
 */

@Repository
public class ProjectSummaryDao extends SqlSessionDaoSupport {

    @Resource(name = "majorSqlSessionTemplate")
    public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
        super.setSqlSessionTemplate(sqlSessionTemplate);
    }

    public IProjectSummaryMapper getMapper() {
        return getSqlSession().getMapper(IProjectSummaryMapper.class);
    }

    public Map<String, Object> selectPieData1ByAllTown(
            Map<String, Object> paramMap) {
        return getMapper().selectPieData1ByAllTown(paramMap);
    }

    public Map<String, Object> selectPieData2ByAllTown(
            Map<String, Object> paramMap) {
        return getMapper().selectPieData2ByAllTown(paramMap);
    }

    public List<Map<String, Object>> selectlineData2ByAllTown(
            Map<String, Object> paramMap) {
        return getMapper().selectlineData2ByAllTown(paramMap);
    }

    public Page<Map<String, Object>> selectGridData2ByAllTown(
            Map<String, Object> paramMap, Page<Map<String, Object>> resultPage) {
        List<Map<String, Object>> resultList = getMapper()
                .selectGridData2ByAllTown(paramMap, resultPage);
        resultPage.setResultList(resultList);
        return resultPage;
    }

    public Map<String, Object> selectPieData1ByOneTown(
            Map<String, Object> paramMap) {
        return getMapper().selectPieData1ByOneTown(paramMap);
    }

    public Map<String, Object> selectPieData2ByOneTown(
            Map<String, Object> paramMap) {
        return getMapper().selectPieData2ByOneTown(paramMap);
    }

    public List<Map<String, Object>> selectlineData2ByOneTown(
            Map<String, Object> paramMap) {
        return getMapper().selectlineData2ByOneTown(paramMap);
    }

    public Page<Map<String, Object>> selectGridData2ByOneTown(
            Map<String, Object> paramMap, Page<Map<String, Object>> resultPage) {
        List<Map<String, Object>> resultList = getMapper()
                .selectGridData2ByOneTown(paramMap, resultPage);
        resultPage.setResultList(resultList);
        return resultPage;
    }

}
